package com.liyuxiang.graph;

//import com.liyuxiang.graph.service.DeptService;

import com.liyuxiang.feign.client.DeptClient;
import com.liyuxiang.graph.service.DeptService;
import com.liyuxiang.graph.service.MedicalCaseService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @Author: liyuxiang
 * @Date: 2025/8/21 11:50
 * @Description: 智能问诊图应用启动类
 */
@SpringBootApplication
@EnableFeignClients(basePackages = "com.liyuxiang.*")
@EnableDiscoveryClient
public class GraphApplication {
    public static void main(String[] args) {
        SpringApplication.run(GraphApplication.class, args);
    }

    @Bean
    public ToolCallbackProvider toolCallbackProvider(DeptService deptService, MedicalCaseService medicalCaseService) {
        return MethodToolCallbackProvider.builder().toolObjects(deptService,medicalCaseService).build();
    }
//    @Bean
//    public ToolCallbackProvider deptServiceTools(DeptClient deptClient) {
//        return MethodToolCallbackProvider.builder().toolObjects(deptClient).build();
//    }
}
